package com.ian.annotation;

import com.ian.config.WithMockCustomUserSecurityContextFactory;
import com.ian.config.WithUserDetailsSecurityContextFactory;
import org.springframework.security.test.context.support.TestExecutionEvent;
import org.springframework.security.test.context.support.WithSecurityContext;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

/**
 * @author Witt
 * @version 1.0.0
 * @date 2022/5/14
 */
@Retention(RetentionPolicy.RUNTIME)
@WithSecurityContext(factory = WithMockCustomUserSecurityContextFactory.class, setupBefore = TestExecutionEvent.TEST_EXECUTION)
public @interface WithMockCustomUser {

    String username() default "Rob";

    String name() default "Rob Winch";
}
